import Api from "../services/Api";

// Method to get a list of all Pokemon
export const getLogin = async (name, password) => {
  try {
    const response = await Api.get(`/login?name=${name}&password=${password}`);
    return response;
  } catch (error) {
    console.error(error);
  }
};

// Get a pokemon details by name
export const getRegisterByEmailPassword = async (name, password) => {
  try {
    const response = await Api.get(`/register?name=${name}&password=${password}`);
    return response;
  } catch (error) {
    console.error(error);
  }
};